package com.shanglida.main;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;

import com.shanglida.R;
import com.shanglida.base.BaseActivity;
import com.shanglida.main.find.WebActivity;
import com.shanglida.main.set.AboutActivity;

/**
 * @author liu
 * @deprecated 设置界面 不过没什么内容 希望后续能够增加
 * @deprecated 实现一些功能 比如 实现 用户的 信息查询 积分等内容
 * @date 2014-02-28 AM
 * @version 1.0
 * @copyright 广州尚礼达信息科技有限公司
 */
public class TabSet extends BaseActivity {
	// 反馈的链接
	private static final String S_URL = "http://www.51m51m.cn/feedback.aspx";
	private ImageView mabout, mhelp;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.tab_set);
		initView();
		initData();
	}

	@Override
	protected void initData() {
		mabout.setOnClickListener(this);
		mhelp.setOnClickListener(this);
	}

	@Override
	protected void initView() {
		mabout = (ImageView) findViewById(R.id.personabout);
		mhelp = (ImageView) findViewById(R.id.personhelp);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		// 关于界面
		case R.id.personabout:
			Intent about = new Intent();
			about.setClass(TabSet.this, AboutActivity.class);
			startActivity(about);
			break;
		// 测试
		case R.id.personhelp:
			OpenWebsite(S_URL);
			break;
		default:
			break;
		}
	}

	private void OpenWebsite(String URL) {
		Intent Mweb = new Intent();
		Mweb.putExtra("URL", URL);
		Mweb.setClass(TabSet.this, WebActivity.class);
		startActivityForResult(Mweb, RESULT_OK);
	}
}
